// type 关键字，定义类型别名
type Name = string;
let name: Name = "zs";

// 字面量类型
let age: 18 = 18;
let sex: "male" | "female" = "male";

// 使用联合类型和字面量类型代替枚举类型
type Color = "red" | "green" | "blue";
let color: Color = "red";
